<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE HTML >
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>项目管理系统-成员</title>

<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<script type="text/javascript" src="js/jQuery.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="kind/kindeditor-min.js"></script>
<style type="text/css">
body {
	background-color: #3D71BC;
	background-image: url("img/pro-bg1.jpg");
	background-repeat: no-repeat;
}

.container {
	width: 1005px;
}

.span3 {
	margin-top: 30px;
	height: 620px;
	margin-left: 0px;
	background-color: #fff;
	border-radius: 0px 160px 6px 0px;
	opacity: 0.3;
}

.span2 {
	margin-top: 110px;
	opacity: 0.7;
}

.span7 {
	margin-top: 110px;
	opacity: 0.7;
}

.accordion-heading {
	height: 50px;
	background-color: #fff;
	opacity: 0.8;
}

.accordion-bottom {
	height: 30px;
	background-color: #fff;
	opacity: 0.8;
}

.flow {
	font-size: 22px;
	overflow: hidden;
	height: 140px;
	width: 300px;
}

.c-right {
	margin-right: auto;
}

li:hover {
	color: #fff;
}

.body-bgc {
	padding-top: 20px;
	background-color: #bod4e5;
	background: url("img/wash-white-30.png") repeat scroll 0 0 transparent;
}

.btn-fb {
	padding: 5px;
	margin: 15px;
	width: 65px;
	height: 45px;
	line-height: 45px;
	font-size: 20px;
	border-radius: 8px;
}

.title {
	height: 30px;
	width: 220px;
	background-image: url("img/title.png");
	background-repeat: no-repeat;
}

hr {
	margin: 5px 10px 10px 0;
}
</style>

</head>
<body>
	<%@ include file="include/topbar.jsp"%>

	<!--网页正文-->

	<div class="container ">
		<jsp:include page="include/left.jsp">
			<jsp:param value="new" name="tag" />
		</jsp:include>
		<div class="span7 well">
			<div class="title"></div>
			<div>

				<form action="savenews.action?id=${id}" method="post">
					<div style="float: left">
						<textarea id="textarea" placeholder="#你想说点什么#"
							style="width: 400px; height: 140px; overflow: hidden; padding-bottom: 5px;border-radius:8px;"
							name="news.content"></textarea>
					</div>
				</form>
				<div style="float: right">
					<button type="submit" class="btn btn-primary btn-large"
						style="margin-left:50px;">发表</button>
				</div>

			</div>



			<div style="margin-top: 180px;">
				<ul
					style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:20px"
					class="breadcrumb well">
					<li class="active"><i class="icon-th"></i>信息流</li>
				</ul>
				<div class="well">
					<c:if test="${empty newsList }">
						<div class="alert alert-info">没人说话</div>


					</c:if>
					<c:forEach items="${newsList}" var="news">
						<div class="accordion-group">
							<div class="accordion-heading">
								<div style="height:5px"></div>
								<input type="hidden" name="news.id" value="${news.id }" />
								<div>
									<div style="margin-left:15px">
										<h4 Style="display:inline;">${news.user.username}&nbsp;:</h4>
										<span><c:out value="${news.content}" escapeXml="false"></c:out>
										</span>
									</div>
								</div>
							</div>
							<div class="accordion-bottom">
								<div style="float: right;margin-right: 10px">
									——${news.outtime}</div>


							</div>
						</div>
					</c:forEach>
				</div>
			</div>
		</div>

		<div class="span2">

			<!--我的任务 -->

			<div style="padding: 8px 0;" class="well c-right">
				<ul class="nav nav-list">
					<li class="nav-header"><h5>我的任务</h5>
					</li>
					
					<!-- 迭代任务列表 -->
					<c:if test="${empty taskList}">
						<div class="alert alert-info">你尚没有任何任务</div>
					</c:if>

					<c:forEach items="${taskList }" var="task">
						<div>
						在目标：<a href="goal.action">${task.goal.name }</a>中	
								<a href="task.action?id=${task.goal.id }">${task.name }</a>
							<hr/>
						</div>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
		var editor;
			$("#textarea").click(
					function() {
						editor = KindEditor.create("#textarea", {
							items : [ 'fontname', 'fontsize', '|', 'forecolor',
									'hilitecolor', 'bold', 'italic',
									'underline', 'removeformat', '|',
									'justifyleft', 'justifycenter',
									'justifyright', 'insertorderedlist',
									'insertunorderedlist', '|', 'emoticons',
									'image', 'link' ]
						});

					});

			

			$("textarea").popover({
				title : "信息提示",
				content : "发布信息不能为空",
				trigger : "manual"
			});

			
			$("textarea").click(function() {
				$(this).popover("hide");
			});
			$("button").click(function() {
			editor.remove();
				if ($("textarea").val() == "") {
					return false;
				}
				
				
				$("form").submit();

			});

		});
	</script>

</body>
</html>
